<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tdl.map</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tdl-module.html">Package&nbsp;tdl</a> ::
        Module&nbsp;map
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tdl.map-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module map</h1><p class="nomargin-top"><span class="codelink"><a href="tdl.map-pysrc.html">source&nbsp;code</a></span></p>
<p>Rogue-like map utilitys such as line-of-sight, field-of-view, and 
  path-finding.</p>

<!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Classes</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="tdl.map.AStar-class.html" class="summary-name">AStar</a><br />
      A* pathfinder
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Functions</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">iterator</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl.map-module.html#quickFOV" class="summary-sig-name">quickFOV</a>(<span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">callback</span>,
        <span class="summary-sig-arg">fov</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">PERMISSIVE</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">radius</span>=<span class="summary-sig-default">7.5</span>,
        <span class="summary-sig-arg">lightWalls</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">sphere</span>=<span class="summary-sig-default">True</span>)</span><br />
      All field-of-view functionality in one call.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl.map-pysrc.html#quickFOV">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Function Details</span></td>
</tr>
</table>
<a name="quickFOV"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">quickFOV</span>(<span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">callback</span>,
        <span class="sig-arg">fov</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">PERMISSIVE</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">radius</span>=<span class="sig-default">7.5</span>,
        <span class="sig-arg">lightWalls</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">sphere</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl.map-pysrc.html#quickFOV">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>All field-of-view functionality in one call.</p>
  <p>Before using this call be sure to make a function, lambda, or method 
  that takes 2 positional parameters and returns True if light can pass the
  tile or False for light-blocking tiles and for positions that are out of 
  bounds of the dungeon.</p>
  <p>This function is 'quick' as in no hassle but can quickly become a very
  slow function call if a large radius is used or the callback provided 
  itself isn't optimized.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - x center of the field-of-view</li>
        <li><strong class="pname"><code>y</code></strong> (int) - y center of the field-of-view</li>
        <li><strong class="pname"><code>callback</code></strong> (function) - This should be a function that takes two positional arguments x,y
          and returns True if the tile at that position is transparent or 
          False if the tile blocks light or is out of bounds.</li>
        <li><strong class="pname"><code>fov</code></strong> (string) - The type of field-of-view to be used.  Available types are:
          <p>'BASIC', 'DIAMOND', 'SHADOW', 'RESTRICTIVE', 'PERMISSIVE', 
          'PERMISSIVE0', 'PERMISSIVE1', ..., 'PERMISSIVE8'</p></li>
        <li><strong class="pname"><code>radius</code></strong> (float) - Raduis of the field-of-view.
          <p>When sphere is True a floating point can be used to fine-tune 
          the range.  Otherwise the radius is just rounded up.</p>
          <p>Be careful as a large radius has an exponential affect on how 
          long this function takes.</p></li>
        <li><strong class="pname"><code>lightWalls</code></strong> (boolean) - Include or exclude wall tiles in the field-of-view.</li>
        <li><strong class="pname"><code>sphere</code></strong> (boolean) - True for a spherical field-of-view.  False for a square one.</li>
    </ul></dd>
    <dt>Returns: iterator</dt>
        <dd>Returns an iterator of (x, y) points that are within the 
          field-of-view</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Wed Dec 05 20:07:32 2012</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
